package com.ccys.db.entity;

import com.ccys.db.rely.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* Created by Mybatis Generator on 2023/12/12
*/
@Data
@ApiModel("采购单批次表")
@Table(name = "tbl_purchase_order_detail")
@NoArgsConstructor
@AllArgsConstructor
public class TblPurchaseOrderDetail extends BaseEntity {
    /**
     * 生成规则:根据顺序，在采购单的 code 后面添加 3 为数字，例如:xxxxx001,xxxxx002
     */
    @ApiModelProperty("生成规则:根据顺序，在采购单的 code 后面添加 3 为数字，例如:xxxxx001,xxxxx002")
    private String code;

    @Column(name = "pharmacy_id")
    private String pharmacyId;

    @Column(name = "order_id")
    private String orderId;

    @Column(name = "product_id")
    private String productId;

    @Column(name = "last_purchase_price")
    private BigDecimal lastPurchasePrice;

    @Column(name = "last_expiration_date")
    private Date lastExpirationDate;

    @Column(name = "expiration_date")
    private Date expirationDate;

    private String description;

    /**
     * 当前批次总数量
     */
    @ApiModelProperty("当前批次总数量")
    private Integer quantity;

    /**
     * 当前批次实际数量
     */
    @Column(name = "quantity_remain")
    @ApiModelProperty("当前批次实际数量")
    private Integer quantityRemain;

    /**
     * 通过总额/总数得出当前批次单价
     */
    @Column(name = "price_unit")
    @ApiModelProperty("通过总额/总数得出当前批次单价")
    private BigDecimal priceUnit;

    /**
     * 作为批次 0 禁用 1 启用
     */
    @ApiModelProperty("作为批次 0 禁用 1 启用")
    private Integer status;

    /**
     * 当前批次总额
     */
    @ApiModelProperty("当前批次总额")
    private BigDecimal amount;

    /**
     * 保留
     */
    @Column(name = "amount_before_discount")
    @ApiModelProperty("保留")
    private BigDecimal amountBeforeDiscount;

    /**
     * 保留
     */
    @ApiModelProperty("保留")
    private BigDecimal discount;

    @Column(name = "pr_remarks")
    private String prRemarks;

    /**
     * 原remarks
     */
    @Column(name = "po_remarks")
    @ApiModelProperty("原remarks")
    private String poRemarks;

    /**
     * 保留
     */
    @Column(name = "dod_is_cancel")
    @ApiModelProperty("保留")
    private Integer dodIsCancel;

    /**
     * 保留
     */
    @Column(name = "dod_is_send_mail")
    @ApiModelProperty("保留")
    private Integer dodIsSendMail;
}